﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace Persistencia
{
    public class ReportePersistencia
    {
        public DataSet GetStoreProcedureCalendar(DateTime fechaStart)
        {
            string connectionString = ConfigurationManager.AppSettings["ConnectionStringProcedures"];
            SqlConnection con = new SqlConnection(connectionString);
            SqlCommand command = new SqlCommand("GetCalendario", con);
            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.Add("@Fecha", SqlDbType.DateTime).Value = fechaStart;
            SqlDataAdapter da = new SqlDataAdapter(command);
            DataSet ds = new DataSet();
            da.Fill(ds);
            return ds;

        }


        public DataSet GetStoreProcedureMedallero()
        {
            string connectionString = ConfigurationManager.AppSettings["ConnectionStringProcedures"];
            SqlConnection con = new SqlConnection(connectionString);
            SqlCommand command = new SqlCommand("Medallero", con);
            command.CommandType = CommandType.StoredProcedure;
            SqlDataAdapter da = new SqlDataAdapter(command);
            DataSet ds = new DataSet();
            da.Fill(ds);
            return ds;

        }


    }
}
